package com.yanqu.road.entity.config.patrons;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 门客组合
 */
public class CombInfo {

	private int id;                //编号

	private int combSkillId;       //组合技能，门客获得时初始化，不可升级

	private int skillId = 0;           //技能编号，全部组合门客获得时解锁，解锁后可升级

	private Map<Integer,Integer> patronsSkill = new ConcurrentHashMap<>();

	private Map<Integer, Map<Integer, CombSkillUnlockInfo>> patronsAdvancedSkill = new ConcurrentHashMap<>();

	private Map<Integer, List<Integer>> patronsSkill2 = new ConcurrentHashMap<>();	//4.5新增羁绊技能 增加组合内门客资质

	private List<Integer> objectIdList = new ArrayList<>();  //组合中的对象编号

	private String extra = "";  //扩展参数，组合组合皮肤用到，两个组合id又组合一起，共同升级第一个技能

	private List<Integer> combList = new ArrayList<>();  //组合组合皮肤id解析

	private String advancedSkillId = "";

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getCombSkillId() {
		return combSkillId;
	}

	public void setCombSkillId(int combSkillId) {
		this.combSkillId = combSkillId;
	}

	public int getSkillId(int patronsId) {
		if(patronsSkill.containsKey(patronsId)){
			return patronsSkill.get(patronsId);
		}
		return skillId;
	}

	public void setPatronsSkill(Map<Integer, Integer> patronsSkill) {
		this.patronsSkill = patronsSkill;
	}

	public void setSkillId(int skillId) {
		this.skillId = skillId;
	}

	public List<Integer> getObjectIdList() {
		return objectIdList;
	}

	public void setObjectIdList(List<Integer> objectIdList) {
		this.objectIdList = objectIdList;
	}

	public Map<Integer, CombSkillUnlockInfo> getAdvancedSkillId(int patronsId) {
		if (patronsAdvancedSkill.containsKey(patronsId)) {
			return patronsAdvancedSkill.get(patronsId);
		}
		if (patronsAdvancedSkill.containsKey(0)) {
			return patronsAdvancedSkill.get(0);
		}
		return null;
	}

	public void setPatronsAdvancedSkill(Map<Integer, Map<Integer, CombSkillUnlockInfo>> patronsAdvancedSkill) {
		this.patronsAdvancedSkill = patronsAdvancedSkill;
	}

	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public List<Integer> getCombList() {
		return combList;
	}

	public void setCombList(List<Integer> combList) {
		this.combList = combList;
	}

	public List<Integer> getSkillId2(int patronsId) {
		return patronsSkill2.get(patronsId);
	}

	public void setPatronsSkill2(Map<Integer, List<Integer>> patronsSkill2) {
		this.patronsSkill2 = patronsSkill2;
	}

    public Map<Integer, Integer> getPatronsIdSkillMap() {
        return patronsSkill;
    }

	public String getAdvancedSkillId() {
		return advancedSkillId;
	}

	public void setAdvancedSkillId(String advancedSkillId) {
		this.advancedSkillId = advancedSkillId;
	}
}
